﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Admin.aspx.vb" Inherits="Client.Admin" MasterPageFile="~/Site.Master" %>


<asp:Content ID="myContent" runat="server" ContentPlaceHolderID="ContentPlaceHolder">
    <style type="text/css">
        .style1
        {
            font-size: x-large;
            text-align: left;
        }
    </style>
<body>
    <div class="style1">
    
        Admin Page<asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" BackColor="White" 
            BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
            DataKeyNames="WebUser_ID" DataSourceID="SqlDataSource1" ForeColor="Black" 
            GridLines="Vertical" style="font-size: medium">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:CommandField ShowEditButton="True" ShowSelectButton="True" 
                    ShowDeleteButton="True" />
                <asp:BoundField DataField="WebUser_ID" HeaderText="WebUser_ID" 
                    InsertVisible="False" ReadOnly="True" SortExpression="WebUser_ID" />
                <asp:BoundField DataField="WebUserName" HeaderText="WebUserName" 
                    SortExpression="WebUserName" />
                <asp:BoundField DataField="Web_Password" HeaderText="Web_Password" 
                    SortExpression="Web_Password" />
                <asp:BoundField DataField="Web_Email" HeaderText="Web_Email" 
                    SortExpression="Web_Email" />
                <asp:BoundField DataField="Web_FullName" HeaderText="Web_FullName" 
                    SortExpression="Web_FullName" />
                <asp:BoundField DataField="Web_Country" HeaderText="Web_Country" 
                    SortExpression="Web_Country" />
            </Columns>
            <FooterStyle BackColor="#CCCC99" />
            <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
            <RowStyle BackColor="#F7F7DE" />
            <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#FBFBF2" />
            <SortedAscendingHeaderStyle BackColor="#848384" />
            <SortedDescendingCellStyle BackColor="#EAEAD3" />
            <SortedDescendingHeaderStyle BackColor="#575357" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:TravConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:TravConnectionString.ProviderName %>" 
            
            SelectCommand="SELECT [WebUser_ID], [WebUserName], [Web_Password], [Web_Email], [Web_FullName], [Web_Country] FROM [website_users]" 
            DeleteCommand="DELETE FROM [website_users] WHERE [WebUser_ID] = ?" 
            InsertCommand="INSERT INTO [website_users] ([WebUser_ID], [WebUserName], [Web_Password], [Web_Email], [Web_FullName], [Web_Country]) VALUES (?, ?, ?, ?, ?, ?)" 
            UpdateCommand="UPDATE [website_users] SET [WebUserName] = ?, [Web_Password] = ?, [Web_Email] = ?, [Web_FullName] = ?, [Web_Country] = ? WHERE [WebUser_ID] = ?">
            <DeleteParameters>
                <asp:Parameter Name="WebUser_ID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="WebUser_ID" Type="Int32" />
                <asp:Parameter Name="WebUserName" Type="String" />
                <asp:Parameter Name="Web_Password" Type="String" />
                <asp:Parameter Name="Web_Email" Type="String" />
                <asp:Parameter Name="Web_FullName" Type="String" />
                <asp:Parameter Name="Web_Country" Type="String" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="WebUserName" Type="String" />
                <asp:Parameter Name="Web_Password" Type="String" />
                <asp:Parameter Name="Web_Email" Type="String" />
                <asp:Parameter Name="Web_FullName" Type="String" />
                <asp:Parameter Name="Web_Country" Type="String" />
                <asp:Parameter Name="WebUser_ID" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
        <asp:Button ID="btnLogOff" runat="server" style="text-align: left" 
            Text="Log Off" />
    </div>
</body>
</asp:Content>